package vip.mtdp.asset.core.dal.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

/**
 * @Description
 * @Author Evans.wang
 * @since 2023/10/29 09:21
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_txn")
public class Txn implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String bizType;

    private Long vaultId;
    private String chain;
    private String coin;

    private Long orderId;

    /**
     * 1=初始化，2=成功，3=处理中，4=失败，6=冲正
     */
    private Integer state;

    private Long feeAccount;

    private BigDecimal fee;

    private String feeCoin;
    private Date txnTime;

    /**
     * 关联源交易id，冲正交易使用
     */
    private Long refId;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
